package ran.quzitech.rnutils;

import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;


import ran.quzitech.rnutils.manager.AssetsManager;
import ran.quzitech.rnutils.manager.DBManager;
import ran.quzitech.rnutils.manager.NetworkManager;
import ran.quzitech.rnutils.manager.RNImageUtil;
import ran.quzitech.rnutils.manager.ShareManager;
import ran.quzitech.rnutils.manager.TextToSpeechManager;


public class UtilsManagerPackage implements ReactPackage {

    public UtilsManagerPackage() {
    }

    @Override
    public List<NativeModule> createNativeModules(ReactApplicationContext reactApplicationContext) {
        List<NativeModule> modules = new ArrayList<>();

        modules.add(new DBManager(reactApplicationContext));
        modules.add(new NetworkManager(reactApplicationContext));
        modules.add(new RNImageUtil(reactApplicationContext));
        modules.add(new ShareManager(reactApplicationContext));
        modules.add(new TextToSpeechManager(reactApplicationContext));
        modules.add(new AssetsManager(reactApplicationContext));
        String str="package myTest;\n" +
                "syntax = \"proto3\";\n" +
                "\n" +
                "message BabyBathMessage {\n" +
                "//测试\n" +
                "\tuint32 LoopCount = 1;\n" +
                " \tuint32 weight = 2;\n" +
                " \t\n" +
                "}";
        return modules;
    }

    @Override
    public List<Class<? extends JavaScriptModule>> createJSModules() {
        return new ArrayList<>();
    }

    @Override
    public List<ViewManager> createViewManagers(ReactApplicationContext reactApplicationContext) {
        return Arrays.asList();
    }
}
